using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;

namespace VSSTQH
{
	public partial class VendorMapper
	{
		#region Methods With Relation

		public static VendorModel ToModel(Vendor entity)
		{
			if (entity == null)
			{
				return null;
			}
			VendorModel model = new VendorModel();
			model.Active = entity.Active;
			model.Address = entity.Address;
			model.CreatedByID = entity.CreatedByID;
			model.CreationDate = entity.CreationDate;
			model.Description = entity.Description;
			model.Fax = entity.Fax;
			model.ModifiedByID = entity.ModifiedByID;
			model.ModifiedDate = entity.ModifiedDate;
			model.TaxID = entity.TaxID;
			model.Telephone = entity.Telephone;
			model.VendorID = entity.VendorID;
			model.VendorName = entity.VendorName;
			return model;
		}
		public static Vendor ToEntity(Vendor entity, VendorModel model)
		{
			if (model == null)
			{
				return null;
			}
			entity.Active = model.Active;
			entity.Address = model.Address;
			entity.CreatedByID = model.CreatedByID;
			entity.CreationDate = model.CreationDate;
			entity.Description = model.Description;
			entity.Fax = model.Fax;
			entity.ModifiedByID = model.ModifiedByID;
			entity.ModifiedDate = model.ModifiedDate;
			entity.TaxID = model.TaxID;
			entity.Telephone = model.Telephone;
			entity.VendorID = model.VendorID;
			entity.VendorName = model.VendorName;
			return entity;
		}

		#endregion

	}
}
